cmake_minimum_required(VERSION 3.10)

# set the project name and version
project(BigIntTest VERSION 1.0)

add_executable(BigIntTest main.cc)

# specify the C++ standard
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)

add_subdirectory(BigInt)



target_link_libraries(BigIntTest PUBLIC BigInt)

target_include_directories(BigIntTest PUBLIC
                           "${PROJECT_BINARY_DIR}"
                           "${PROJECT_SOURCE_DIR}"
                           #${EXTRA_INCLUDES}
                           )
include(FetchContent)
FetchContent_Declare(
    googletest
    URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
)
# For Windows: Prevent overriding the parent project's compiler/linker settings
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(googletest)
                

enable_testing()

add_executable(
    hello_test
    BigIntUnitest.cc
)
target_link_libraries(
    hello_test
    GTest::gtest_main
    BigInt
)
target_include_directories(hello_test PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

include(GoogleTest)
gtest_discover_tests(hello_test)
